<template>
	<view @click="clickthis" style="background: #fff;
    margin-top: 15px;">
		<view class="hots" v-if="type===0" style="padding-bottom:30rpx;">
		    <view class="center">
		      <view :class="subtitle!=''?'p1':'title'" :style="'color: '+titleColor">{{title}}</view>
		      <view class="p2" v-if="subtitle!=''">{{subtitle}}</view>
			  <view class="p2">{{time}}</view>
		    </view>
		    <view class="right" >
		      <image :src="url" style="width:45px;height:45px;"/>
		    </view>
		</view>
	</view>

</template>

<script>

export default {
  data() {
    return {};
  },

  components: {},
  props: {
	time: {
		tpye: String,
		default: ''
	},
    colors: {
      type: String,
	  default:'#55aaff'
    },
	url: {
		type: String,
	  	default:''
	},
	titleColor: {
	  type: String,
	  default:'#000'
	},
	title:{
		type: String,
		default:''
	},
	subtitle:{
		type: String,
		default:''
	},
	showmore:{
		type: Boolean,
		default:true
	},
	type:{
		type:Number,
		default:0
	},
	icon:{
		type:String,
		default:"star-fill"
	}
  },
  
  methods: {
	  
	  clickthis(){
		  console.log(this.url)
		  uni.previewImage({
			  urls: [this.url],
			//   longPressActions: {
			// 	  itemList: ['发送给朋友', '保存图片', '收藏'],
			// 	  success: function(data) {
			// 		  console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
			// 	  },
			// 	  fail: function(err) {
			// 		  console.log(err.errMsg);
			// 	  }
			//   }
		  });
	  }
  }
};
</script>
<style lang="scss" scoped>
.hots{
  padding: 0 3%;
  padding-top: 10upx;
  border-bottom: 1upx solid #F8F8F8;
  overflow: hidden;
}
.hots:active{
  opacity: 0.8;
}
.left_icon{
  float: left;
}
.left_icon .iconfont{
  font-size: 46upx;
  display: inline-block;
  margin-right: 20upx;
  line-height: 100upx;
}
.center{
  float: left;
  
}
.title{
	font-size: 28upx;
	font-weight: 500;
	color: #000;
	margin-top: 10upx;
}
.p1{
  font-size: 28upx;
  font-weight: 500;
  margin-top: 10upx;
}
.p2{
  font-size: 24upx;
  color: #999;
}
.right{
  float: right;
}
.right .right_img{
  width: 40upx;
  height: 40upx;
  display: inline-block;
  margin-top: 28upx;
}
</style>